package LxTest;

import java.time.LocalDateTime;
import java.util.Scanner;

public class While {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (true){
            System.out.println("请录入数据");
            if (scanner.next().equals("n")){
                break;
            }else {
                LocalDateTime now = LocalDateTime.now();

                System.out.println("当地时间为 " + now);

            }


        }
    }
}
